package com.bat.conf;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

/**
 * @program: parent
 * @description:
 * @author: zhoupengfei
 * @create: 2019-10-12 11:09
 **/
@Configuration
@Slf4j
public class MdcConf implements WebMvcConfigurer {
    @Resource
    private WebTraceRequestInterceptorConf webTraceRequestInterceptorConf;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        log.info("==开启==");
        registry.addInterceptor(webTraceRequestInterceptorConf).addPathPatterns("/**");
    }
}